<html>
<head><meta charset="utf-8"><title>--on-fail=print-env is broken? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/--on-fail.3Dprint-env.20is.20broken.3F.html">--on-fail=print-env is broken?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="206378517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/--on-fail%3Dprint-env%20is%20broken%3F/near/206378517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/--on-fail.3Dprint-env.20is.20broken.3F.html#206378517">(Aug 09 2020 at 04:34)</a>:</h4>
<p>I don't see any env vars here. Got the flag from <a href="https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html?highlight=print,env#environment-variables">https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html?highlight=print,env#environment-variables</a>.</p>
<div class="codehilite"><pre><span></span><code>error: cannot find a built-in macro with name `cfg`
    --&gt; /home/joshua/rustc/library/core/src/macros/mod.rs:1183:5
     |
1183 | /     macro_rules! cfg {
1184 | |         ($($cfg:tt)*) =&gt; {
1185 | |             /* compiler built-in */
1186 | |         };
1187 | |     }
     | |_____^

error: aborting due to previous error

error: Could not document `proc_macro`.

Caused by:
  process didn&#39;t exit successfully: `/home/joshua/rustc/build/bootstrap/debug/rustdoc --edition=2018 --crate-type lib --crate-name proc_macro library/proc_macro/src/lib.rs --target x86_64-unknown-linux-gnu -o /home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/doc --error-format=json --json=diagnostic-rendered-ansi --markdown-css rust.css --markdown-no-toc -Z unstable-options --resource-suffix 1.47.0 --index-page /home/joshua/rustc/src/doc/index.md -L dependency=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage1-std/release/deps --extern std=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libstd-f5b02ec1cd44050f.rmeta -Dwarnings -Winvalid_codeblock_attributes` (exit code: 1)


command did not execute successfully: &quot;/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/bin/cargo&quot; &quot;rustdoc&quot; &quot;--target&quot; &quot;x86_64-unknown-linux-gnu&quot; &quot;-Zbinary-dep-depinfo&quot; &quot;-j&quot; &quot;8&quot; &quot;--release&quot; &quot;--features&quot; &quot;panic-unwind backtrace compiler-builtins-c&quot; &quot;--manifest-path&quot; &quot;/home/joshua/rustc/library/test/Cargo.toml&quot; &quot;-p&quot; &quot;proc_macro&quot; &quot;--&quot; &quot;--markdown-css&quot; &quot;rust.css&quot; &quot;--markdown-no-toc&quot; &quot;-Z&quot; &quot;unstable-options&quot; &quot;--resource-suffix&quot; &quot;1.47.0&quot; &quot;--index-page&quot; &quot;/home/joshua/rustc/src/doc/index.md&quot;
expected success, got: exit code: 101


failed to run: /home/joshua/rustc/build/bootstrap/debug/bootstrap doc --stage 1 library/proc_macro/ --on-fail=print-env
</code></pre></div>



<a name="206390814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/--on-fail%3Dprint-env%20is%20broken%3F/near/206390814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/--on-fail.3Dprint-env.20is.20broken.3F.html#206390814">(Aug 09 2020 at 11:22)</a>:</h4>
<p>it only affects rustc invocations, implementation of <code>on-fail</code> is in the <code>rustc</code> wrapper that <code>x.py</code> executes.</p>



<a name="206390877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/--on-fail%3Dprint-env%20is%20broken%3F/near/206390877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/--on-fail.3Dprint-env.20is.20broken.3F.html#206390877">(Aug 09 2020 at 11:24)</a>:</h4>
<p>additionally that documentation seems wrong, the <code>on-fail</code> accepts a command to run, so you want <code>env</code> the command...</p>



<a name="206393710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/--on-fail%3Dprint-env%20is%20broken%3F/near/206393710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/--on-fail.3Dprint-env.20is.20broken.3F.html#206393710">(Aug 09 2020 at 12:48)</a>:</h4>
<p>x.py also uses a fake rustdoc so it seems like it should have worked here</p>



<a name="206393727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/--on-fail%3Dprint-env%20is%20broken%3F/near/206393727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/--on-fail.3Dprint-env.20is.20broken.3F.html#206393727">(Aug 09 2020 at 12:49)</a>:</h4>
<p>I just want a way to run gdb on rustdoc :( do you know how to do that? How would you run gdb on rustc?</p>



<a name="206393818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/--on-fail%3Dprint-env%20is%20broken%3F/near/206393818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> teor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/--on-fail.3Dprint-env.20is.20broken.3F.html#206393818">(Aug 09 2020 at 12:51)</a>:</h4>
<p>Sounds like you need RUSTC_WRAPPER, but for rustdoc, and in an interactive terminal.</p>



<a name="206394024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/--on-fail%3Dprint-env%20is%20broken%3F/near/206394024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/--on-fail.3Dprint-env.20is.20broken.3F.html#206394024">(Aug 09 2020 at 12:57)</a>:</h4>
<p>That sounds like it might work</p>



<a name="206394033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/--on-fail%3Dprint-env%20is%20broken%3F/near/206394033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/--on-fail.3Dprint-env.20is.20broken.3F.html#206394033">(Aug 09 2020 at 12:57)</a>:</h4>
<p>Is RUSTDOC_WRAPPER a thing? Rustdoc seems to be forgotten a lot.</p>



<a name="206394818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/--on-fail%3Dprint-env%20is%20broken%3F/near/206394818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/--on-fail.3Dprint-env.20is.20broken.3F.html#206394818">(Aug 09 2020 at 13:20)</a>:</h4>
<p>rustdoc wrapper probably just doesn't have the on fail handling</p>



<a name="206394981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/--on-fail%3Dprint-env%20is%20broken%3F/near/206394981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/--on-fail.3Dprint-env.20is.20broken.3F.html#206394981">(Aug 09 2020 at 13:25)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/75334">https://github.com/rust-lang/rust/issues/75334</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>